<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div>
        test
    </div>
    <script type="text/javascript">


        var pItem = 130069
        pItem= pItem.toFixed(2)
        var pArray = pItem.split('.')
        var res= toThousands(pArray[0]) + "."+pArray[1]
        console.log('res', res)
        // 数字千分位
        function toThousands(num) {
            var num = (num || 0).toString()
            var result = ''
            // 将传入数据转换为字符串
            while (num.length > 3) {
                // 只要字符串长度大于三就执行
                result = ',' + num.slice(-3) + result;
                // 将字符串后三位裁剪并加入最终的字符串
                num = num.slice(0, num.length - 3);
                // 更新字符串长度
            }
            if (num) {
                result = num + result;
            }
            return result;
        }
    </script>
</body>

</html>